package com.mrs.controller;

import com.mrs.common.ResponseResult;
import com.mrs.service.UploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * description: UploadController
 * date: 2022/8/10 22:12
 * author: MR.孙
 */
@RestController
public class UploadController {

    @Autowired
    private UploadService uploadService;

    //头像上传接口
    @PostMapping("/upload")
    public ResponseResult uploadImg(MultipartFile img){
        return uploadService.uploadImg(img);
    }

}
